﻿using Shared.DI;
using StructureMap;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DI
{
    public class DependencyResolverAdapter : IDependencyResolver
    {
        Container container;
        public DependencyResolverAdapter(Container container)
        {
            this.container = container;
        }

        public T Resolve<T>()
        {
            return (T)container.TryGetInstance(typeof(T));
        }
    }
}
